// index.js
import api from '../../utils/api'
import {
  showStatus
} from '../../utils/util'
Page({
  data: {
    dataForm: {},
    dataList: []
  },
  onLoad: function (options) {
    const id = options.id

    api.carOrderDetials({
      id: id
    }).then(res => {
      let data = []
      data.push(res.data)
      showStatus(data, {
        value: 'carType',
        type: 'TRUCK_TYPE'
      }).then(res => {
        showStatus(res, {
          value: 'carColor',
          type: 'car_color'
        }).then(res => {
          this.setData({
            dataForm: res[0],
          });

        })

      })


    })


  },


})